<?php

namespace app\admin\controller;

use app\AdminBaseController;

class Partner extends AdminBaseController
{

    public function index(){
        if($this->request->isAjax()){
            $rows = $this->request->param('rows',10,false);
            $res = \app\model\Partner::where([])->order('id desc')->paginate($rows,false);

            return json(['total'=>$res->total(),'rows'=>$res->items()]);
        } else {

            return view();
        }

    }

}